﻿<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    
    <Style TargetType="{x:Type HeaderedContentControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="HeaderedContentControl">
                    <Border
                        BorderBrush="White"
                        BorderThickness="1">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Border
                                BorderBrush="White"
                                BorderThickness="0,0,0,1">
                                <TextBlock
                                    FontSize="16"
                                    TextAlignment="Center"
                                    Text="{TemplateBinding Header}"/>
                            </Border>
                            <ContentPresenter
                                Grid.Row="1"
                                Margin="{TemplateBinding Padding}"
                                Content="{TemplateBinding Content}"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>